package com.vito.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AppConfig {

	/*
	 * 图片服务器域名
	 */
	public static String SOURCE_SERVER_DOMAIN = "";

	@Value("${app.source.server.domain}")
	public void setSourceServerDomain(String sourceServerDomain) {
		SOURCE_SERVER_DOMAIN = sourceServerDomain;
	}

	/*
     * 图片服务器地址前缀
     */

	public static String FILE_STORE_PREFIX = ""; // 本地文件存储前缀

	@Value("${app.file.store.prefix}")
	public void setFileStorePrefix(String fileStorePrefix) {
		FILE_STORE_PREFIX = fileStorePrefix;
	}

	/*
	 * 图片服务器地址
	 */
	public static String SOURCE_PUBLIC_PATH = "";

	@Value("${app.source.public.path}")
	public void setSourcePublicPath(String sourcePublicPath) {
		SOURCE_PUBLIC_PATH = sourcePublicPath;
	}

	/*
	 * 附件存储文件夹名
	 */
	public static String ATTACHMENT_DIR = "";

	@Value("${app.attachment.dir}")
	public void setAttachmentDir(String attachmentDir) {
		ATTACHMENT_DIR = attachmentDir;
	}

	/*
     * OSS APPID
     */
	public static String OSS_APPID = "";

	@Value("${app.oss.appid}")
	public void setOssAppid(String ossAppid) {
		OSS_APPID = ossAppid;
	}

	/*
     * OSS SECRETID
     */
	public static String OSS_SECRETID = "";

	@Value("${app.oss.secretid}")
	public void setOssSecretid(String ossSecretid) {
		OSS_SECRETID = ossSecretid;
	}

	/*
     * OSS SECRETKEY
     */
	public static String OSS_SECRETKEY = "";

	@Value("${app.oss.secretkey}")
	public void setOssSecretkey(String ossSecretkey) {
		OSS_SECRETKEY = ossSecretkey;
	}

	/*
     * OSS 地域
     */
	public static String OSS_REGION = "";

	@Value("${app.oss.region}")
	public void setOssRegion(String ossRegion) {
		OSS_REGION = ossRegion;
	}

	/*
     * OSS 存储位置
     */
	public static String OSS_DEFAULT_BUCKET = "";

	@Value("${app.oss.default.bucket}")
	public void setOssDefaultBucket(String ossDefaultBucket) {
		OSS_DEFAULT_BUCKET = ossDefaultBucket;
	}


	public static String FFMPEG_PATH = "";

	@Value("${app.ffmpeg.path}")
	public void setFfmpegPath(String ffmpegPath) {
		FFMPEG_PATH = ffmpegPath;
	}
}
